package vaani.internal.beagle;

/**
 *
 * @author sourcemorph
 */
public class Result {
    private String url;
    private boolean local;
    private String filetype;

    public Result(String u) {
        url = u;
        if(url.startsWith("http://") || url.startsWith("https://") || url.startsWith("ftp://")) {
            local = false;
        }
        else local = true;
        filetype = url.substring(url.lastIndexOf('.')+1);
    }

    public String getURL() {
        return url;
    }

    public String getFileType() {
        return filetype;
    }

    public boolean isLocal() {
        return local;
    }
}
